package com.cjg.xiancheng;

public class threadYield {
    public static void main(String[] args) {
        didi didi = new didi();
        new Thread(didi,"一号弟弟").start(); new Thread(didi,"二号弟弟").start();
    }
}

class didi implements Runnable{

    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName()+"start");
        Thread.yield();
        System.out.println(Thread.currentThread().getName()+"end");
    }
}
